package com.hisense.ovcloud.common3.constants;

import io.netty.buffer.PooledByteBufAllocator;
import lombok.Data;


public class Constants {
    public static class BASE_RESPONSE {
        public final static int CODE_SUCCESS = 0;
        public final static int CODE_FAILED = 1;
    }
    public static class ENC {
        public final static String ENC_DEFAULT_ALGORITHM = "PBEWithMD5AndDES";
        public final static String ENC_DEFAULT_PASSWD = "edwin1987";
    }

    @Data
    public static class TCPOptions {
        public static boolean TCP_NODELAY = false;
        public static boolean AUTO_CLOSE = false;
        public static boolean SO_KEEPALIVE = true;
        public static boolean SO_REUSEADDR = true;
        public static int SO_SNDBUF = 1024;
        public static int SO_RCVBUF = 1024;
        public static int SO_BACKLOG = 1024;
        public static PooledByteBufAllocator ALLOCATOR = PooledByteBufAllocator.DEFAULT;
    }

    public static class AcJulink {
        // 消息分隔符
        public static final String DATASEP = "\n";

        // 所有消息类型
        public static class MSG_TYPES {
            public static int DEVICE_AUTHENTICATION = 101;
            public static int EXCHANGE_ENCRYPTION_KEY = 102;
            public static int RETRIVE_SYSTEM_CONFIG = 103;
            public static int SEND_CONTROL_COMMAND = 201;
            public static int SEND_QUERY_COMMAND = 202;
            public static int SEND_CONTROL_RERET = 203;
            public static int QUERY_VERSON_COMMAND = 301;
            public static int SEND_OTA_COMMAND = 302;
            public static int QUERY_OTA_COMMAND = 303;
            public static int SEND_MCU_UPGRADE_COMMAND = 305;
            public static int SEND_COMMON_COMMAND = 310;
            public static int REPORT_COMMON_COMMAND = 312;
            public static int BIND_DEV_COMMAND = 401;
            public static int UNBIND_DEV_COMMAND = 402;
            public static int GET_BIND_DEV_COMMAND = 403;
            public static int GET_HOME_DEVLIST_COMMAND = 404;
            public static int SEND_DEVINFO_CHANGE_COMMAND = 405;
            public static int DEVICE_EXTINFO_STORE = 406;
            public static int DEVICE_RESET = 407;
            public static int GET_SCENE_LIST_COMMAND = 501;
            public static int GET_SCENE_INFO_COMMAND = 502;
            public static int SEND_SCENE_MODIFY_COMMAND = 503;
            public static int SEND_SCENE_EXE_COMMAND = 504;
            public static int SEND_CONFIG_DATA_COMMAND = 601;
            public static int REPORT_CONFIG_DATA = 602;
            public static int REPORT_STATUS_COMMAND = 901;
            public static int REPORT_HEARTBEAT_COMMAND = 902;
            public static int REPORT_STATUS_UPDATE = 903;
        }
    }
}
